let api_host = `/v1`;

export { api_host };

export default {
  // user
  login: `${api_host}/nexfly-auth/login`,
  logout: `${api_host}/nexfly-auth/logout`,
  register: `${api_host}/nexfly-system/api/account/register`,
  setting: `${api_host}/nexfly-system/api/account/setting`,
  user_info: `${api_host}/nexfly-system/api/account/get`,
  tenant_info: `${api_host}/nexfly-system/api/account/org/get`,
  set_tenant_info: `${api_host}/nexfly-system/api/set/org`,

  // llm model
  factories_list: `${api_host}/nexfly-system/api/provider/system/list`,
  llm_list: `${api_host}/nexfly-system/api/provider/available/list`,
  my_llm: `${api_host}/nexfly-system/api/provider/user/list`,
  set_api_key: `${api_host}/nexfly-system/api/provider/add`,
  add_llm: `${api_host}/nexfly-system/api/provider/add`,
  delete_llm: `${api_host}/nexfly-system/api/provider/delete`,

  // knowledge base
  kb_list: `${api_host}/nexfly-system/api/dataset/list`,
  create_kb: `${api_host}/nexfly-system/api/dataset/save`,
  update_kb: `${api_host}/nexfly-system/api/dataset/save`,
  rm_kb: `${api_host}/nexfly-system/api/dataset/delete`,
  get_kb_detail: `${api_host}/nexfly-system/api/dataset/detail`,

  // chunk
  chunk_list: `${api_host}/nexfly-system/api/segment/list`,
  create_chunk: `${api_host}/nexfly-system/api/segment/create`,
  set_chunk: `${api_host}/nexfly-system/api/segment/create`,
  get_chunk: `${api_host}/nexfly-system/api/segment/get`, 
  switch_chunk: `${api_host}/nexfly-system/api/segment/switch`,
  rm_chunk: `${api_host}/nexfly-system/api/segment/delete`,
  retrieval_test: `${api_host}/nexfly-system/api/segment/retrieval/test`,
  knowledge_graph: `${api_host}/nexfly-system/api/segment/knowledge/graph`,

  // document
  get_document_list: `${api_host}/nexfly-system/api/document/list`,
  document_change_status: `${api_host}/nexfly-system/api/document/change/status`,
  document_rm: `${api_host}/nexfly-system/api/document/delete`,
  document_delete: `${api_host}/nexfly-system/api/document/delete`,
  document_rename: `${api_host}/nexfly-system/api/document/rename`,
  document_create: `${api_host}/nexfly-system/api/document/create`,
  document_run: `${api_host}/nexfly-system/api/document/process`,
  document_change_parser: `${api_host}/nexfly-system/api/document/change_parser`,
  document_thumbnails: `${api_host}/nexfly-system/api/document/thumbnails`,
  get_document_file: `${api_host}/nexfly-system/api/document/get`,
  document_upload: `${api_host}/nexfly-system/api/document/upload`,
  web_crawl: `${api_host}/nexfly-system/api/document/web_crawl`,
  document_infos: `${api_host}/nexfly-system/api/document/infos`,
  upload_and_parse: `${api_host}/nexfly-system/api/attachment/upload`,

  attachment_infos: `${api_host}/nexfly-system/api/attachment/list_by_ids`,
  attachment_delete: `${api_host}/nexfly-system/api/attachment/delete`,

  // chat
  setDialog: `${api_host}/nexfly-system/api/app/save`,
  getDialog: `${api_host}/nexfly-system/api/app/get`,
  removeDialog: `${api_host}/nexfly-system/api/app/delete`,
  listDialog: `${api_host}/nexfly-system/api/app/list`,
  setConversation: `${api_host}/nexfly-system/api/app/conversation/set`,
  getConversation: `${api_host}/nexfly-system/api/app/conversation/get`,
  listConversation: `${api_host}/nexfly-system/api/app/conversation/list`,
  removeConversation: `${api_host}/nexfly-system/api/app/conversation/delete`,
  completeConversation: `${api_host}/nexfly-system/api/app/chat`,
  deleteMessage: `${api_host}/nexfly-system/api/app/conversation/delete_msg`,
  thumbup: `${api_host}/nexfly-system/conversation/thumbup`,
  tts: `${api_host}/nexfly-system/conversation/tts`,
  ask: `${api_host}/nexfly-system/conversation/ask`,
  mindmap: `${api_host}/nexfly-system/conversation/mindmap`,
  getRelatedQuestions: `${api_host}/nexfly-system/conversation/related_questions`,
  // chat for external
  createToken: `${api_host}/api/new_token`,
  listToken: `${api_host}/api/token_list`,
  removeToken: `${api_host}/api/rm`,
  getStats: `${api_host}/api/stats`,
  createExternalConversation: `${api_host}/nexfly-system/api/app/conversation/set`,
  getExternalConversation: `${api_host}/api/conversation`,
  completeExternalConversation: `${api_host}/api/completion`,
  uploadAndParseExternal: `${api_host}/nexfly-system/api/attachment/upload`,

  // file manager
  listFile: `${api_host}/nexfly-system/file/list`,
  uploadFile: `${api_host}/nexfly-system/file/upload`,
  removeFile: `${api_host}/nexfly-system/file/rm`,
  renameFile: `${api_host}/nexfly-system/file/rename`,
  getAllParentFolder: `${api_host}/nexfly-system/file/all_parent_folder`,
  createFolder: `${api_host}/nexfly-system/file/create`,
  connectFileToKnowledge: `${api_host}/nexfly-system/file2document/convert`,
  getFile: `${api_host}/nexfly-system/file/get`,
  moveFile: `${api_host}/nexfly-system/file/mv`,

  // system
  getSystemVersion: `${api_host}/nexfly-system/api/system/version`,
  getSystemStatus: `${api_host}/nexfly-system/api/system/status`,

  // flow
  listTemplates: `${api_host}/nexfly-system/canvas/templates`,
  listCanvas: `${api_host}/nexfly-system/canvas/list`,
  getCanvas: `${api_host}/nexfly-system/canvas/get`,
  removeCanvas: `${api_host}/nexfly-system/canvas/rm`,
  setCanvas: `${api_host}/nexfly-system/canvas/set`,
  resetCanvas: `${api_host}/nexfly-system/canvas/reset`,
  runCanvas: `${api_host}/nexfly-system/canvas/completion`,
  testDbConnect: `${api_host}/nexfly-system/canvas/test_db_connect`,
};
